#ifndef INFINITY_WORLD_AREA_H
#	define INFINITY_WORLD_AREA_H

#include "worldsector.h"

namespace infinity {

class WorldArea
{
public : //! @name Constants
	//! @{
	static const dw::int32 SideSectors = 4;
	static const dw::int32 SideCells = SideSectors * WorldSector::SideCells;
	//! @}

public : // @name Types definitions
	//! @{
	typedef std::vector< WorldSector* > SectorsCollection;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	WorldArea();
	~WorldArea();
	//! @}

public : //! @name Helpers
	//! @{
	static Vector3i getAreaIdFromSector(const Vector3i& sectorId);
	static Vector3i getAreaIdFromCell(const Vector3i& cellId);
	//! @}

public : //! @name Commands
	//! @{
	void addSector(WorldSector* sector);
	void removeSector(WorldSector* sector);
	//! @}

public : //! @name Setup
	//! @{
	void setId(const Vector3i& id);
	//! @}

public : //! @name State
	//! @{
	const Vector3i& getId() const ;
	WorldSector* getSector(const Vector3i& sectorId);
	SectorsCollection& getSectors() { return m_sectors; }
	//! @}

private : // @name Data
	//! @{
	Vector3i m_id;
	SectorsCollection m_sectors;
	//! @}
};

} // namespace infinity

#include "worldarea.inl"

#endif // !INFINITY_WORLD_AREA_H
